/**
 * 
 */
package container;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author think
 * IOC容器
 *
 */
public class MyContainer {
	
	private static MyContainer instance = null;
	
	private Map<Object,Object> beanMaps = new ConcurrentHashMap<Object,Object>();
	
	private Map<String,ProcessorInfo> processorInfoMap = new HashMap<String,ProcessorInfo>();
	
	public static MyContainer getInstance(){
		if(instance==null){
			instance = new MyContainer();
		}
		return instance;
	}
	
	public Object getBean(Object key){
		return beanMaps.get(key);
	}
	
	public Object regBean(Object key,Object value){
		return beanMaps.put(key,value);
	}

	/**
	 * @return the processorInfoMap
	 */
	public Map<String, ProcessorInfo> getProcessorInfoMap() {
		return processorInfoMap;
	}
	
	

}
